// 导入数据库操作模块
const db = require('../db/index')
const https = require('https');

//  登录接口处理函数
exports.login = (req,res) => {+
    // console.log(req.body.code);
    // 调用接口获取用户的唯一标识符（openid）
    https.get('https://api.weixin.qq.com/sns/jscode2session', {
        params: {
            code: req.body.code,
        }
    }, function (response) {
        response.on('data', function (data) {
            console.log(data);
        }
        )
    }
    )
}

